vd = VideoWriter('movie.avi');
vd.FrameRate=24;
open(vd);
for i = 1:6000
    str = ['TT' num2str(i) '.png'];
    A = imread(['.\figure\' str]);
    frame = im2frame(A);
    writeVideo(vd,A); 
end
close(vd)